#pragma once

#include <vex/iterable/concept/bidirectional_range_concept.h>

namespace vex { namespace iterable { namespace concept {

    template <class T>
    class RandomAccessRange : public ForwardRange<T> {
    public:
        typedef range_traits<T> traits;
        typedef typename traits::category category;
        typedef typename traits::range_type range_type;
        typedef typename traits::value_type value_type;
        typedef typename traits::reference reference;
        typedef typename traits::pointer pointer;
    public:
        BOOST_CONCEPT_ASSERT((boost::Convertible<category, random_access_range_tag>));
        BOOST_CONCEPT_USAGE(RandomAccessRange)
        {
            m_result_of_move = m_instance.move_front_of(std::size_t());
            m_result_of_move = m_instance.move_back_of(std::size_t());
            m_size_result_or_parameter = m_instance.size();
            this->same_type(std::declval<reference>(), m_instance.at(std::size_t()));
        }
    private:
        T m_instance;
        std::size_t m_size_result_or_parameter;
        bool m_result_of_move;
    };
}}}